package com.zly.lab.blog.entity;

import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class ResponseData {
    private boolean success;//响应是否成功
    private String msg;//响应信息


    //响应成功
    public static ResponseData OK(){
        ResponseData responseData = new ResponseData();
        responseData.setSuccess(true);
        responseData.setMsg("响应成功!");
        return responseData;
    }
    //响应失败
    public static ResponseData FAILED(){
        ResponseData responseData = new ResponseData();
        responseData.setSuccess(false);
        responseData.setMsg("响应失败!");
        return responseData;
    }
}
